package com.example.xinguanvue.bean;

import org.springframework.context.annotation.Configuration;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;
//用户实体类
@Component
public class User {
    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", nickname='" + nickname + '\'' +
                ", email='" + email + '\'' +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", modifiedTime=" + modifiedTime +
                ", sex=" + sex +
                ", salt='" + salt + '\'' +
                ", type=" + type +
                ", password='" + password + '\'' +
                ", birth=" + birth +
                ", departmentId=" + departmentId +
                ", avatar='" + avatar + '\'' +
                '}';
    }

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.id
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private Long id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.username
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private String username;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.nickname
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private String nickname;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.email
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private String email;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.phone_number
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private String phoneNumber;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.status
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private Integer status;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.create_time
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.modified_time
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date modifiedTime;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.sex
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private Integer sex;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.salt
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private String salt;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.type
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private Integer type;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.password
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private String password;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.birth
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birth;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.department_id
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private Long departmentId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_user.avatar
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    private String avatar;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.id
     *
     * @return the value of tb_user.id
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public Long getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.id
     *
     * @param id the value for tb_user.id
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.username
     *
     * @return the value of tb_user.username
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public String getUsername() {
        return username;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.username
     *
     * @param username the value for tb_user.username
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.nickname
     *
     * @return the value of tb_user.nickname
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public String getNickname() {
        return nickname;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.nickname
     *
     * @param nickname the value for tb_user.nickname
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setNickname(String nickname) {
        this.nickname = nickname == null ? null : nickname.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.email
     *
     * @return the value of tb_user.email
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public String getEmail() {
        return email;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.email
     *
     * @param email the value for tb_user.email
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.phone_number
     *
     * @return the value of tb_user.phone_number
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public String getPhoneNumber() {
        return phoneNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.phone_number
     *
     * @param phoneNumber the value for tb_user.phone_number
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber == null ? null : phoneNumber.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.status
     *
     * @return the value of tb_user.status
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.status
     *
     * @param status the value for tb_user.status
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.create_time
     *
     * @return the value of tb_user.create_time
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.create_time
     *
     * @param createTime the value for tb_user.create_time
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.modified_time
     *
     * @return the value of tb_user.modified_time
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public Date getModifiedTime() {
        return modifiedTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.modified_time
     *
     * @param modifiedTime the value for tb_user.modified_time
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setModifiedTime(Date modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.sex
     *
     * @return the value of tb_user.sex
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public Integer getSex() {
        return sex;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.sex
     *
     * @param sex the value for tb_user.sex
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setSex(Integer sex) {
        this.sex = sex;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.salt
     *
     * @return the value of tb_user.salt
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public String getSalt() {
        return salt;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.salt
     *
     * @param salt the value for tb_user.salt
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setSalt(String salt) {
        this.salt = salt == null ? null : salt.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.type
     *
     * @return the value of tb_user.type
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public Integer getType() {
        return type;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.type
     *
     * @param type the value for tb_user.type
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.password
     *
     * @return the value of tb_user.password
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public String getPassword() {
        return password;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.password
     *
     * @param password the value for tb_user.password
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.birth
     *
     * @return the value of tb_user.birth
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public Date getBirth() {

        return birth;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.birth
     *
     * @param birth the value for tb_user.birth
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setBirth(Date birth) {
        this.birth = birth;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.department_id
     *
     * @return the value of tb_user.department_id
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public Long getDepartmentId() {
        return departmentId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.department_id
     *
     * @param departmentId the value for tb_user.department_id
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setDepartmentId(Long departmentId) {
        this.departmentId = departmentId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tb_user.avatar
     *
     * @return the value of tb_user.avatar
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public String getAvatar() {
        return avatar;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tb_user.avatar
     *
     * @param avatar the value for tb_user.avatar
     *
     * @mbg.generated Thu Jan 28 19:18:35 CST 2021
     */
    public void setAvatar(String avatar) {
        this.avatar = avatar == null ? null : avatar.trim();
    }
}